Welcome to a new series all about working with machine learning models in JavaScript in the browser using the Transformers.js library! In this introduction, I cover what Transformers.js is, how to load it into a p5.js sketch, explain the pipeline API, and demonstrate sentiment analysis and language detection examples. Code:
🚀 Watch this video ad-free on Nebula
p5.js Web Editor Sketches:
🕹️ Sentiment Analysis:
🕹️ Language Detection:
References:
💻 Transformers.js Documentation:
🤗 Hugging Face:
🤗 Hugging Face Models:
🤗 Xenova on Hugging Face:
🤗 Whisper Web:
💻 p5.js 2.0 reference:
📓 ES6 Modules:
📓 Quantization:
Videos:
🚂
🚂
Timestamps:
0:00 Welcome!
1:53 Why JavaScript and not Python?
3:01 What is Hugging Face?
4:03 Transformers.js Documentation
4:18 Pipeline API
5:41 import syntax and ES6 modules
8:34 Object Destructuring
11:33 Creating a Pipeline
13:18 Sentiment Analysis Example
19:04 Tasks and Models on Hugging Face
20:20 Language Detection Example
22:27 Device: WebGPU, CPU and more
24:25 Data Types and Quantization
27:54 See you next time!
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website:
👾 Share Your Creation!
🚩 Suggest Topics:
💡 GitHub:
💬 Discord:
💖 Membership:
🛒 Store:
🖋️ Twitter:
📸 Instagram:
🎥
🎥
🔗 p5.js:
🔗 p5.js Web Editor:
🔗 Processing:
📄 Code of Conduct:
This description was auto-generated. If you see a problem, please open an issue:
#machinelearning #transformersjs #huggingface #sen
|
When you're negotiating your salary for ...
What are recent advances in the field of...
Today Quincy Larson interviews Kunal Kus...
Arrow functions don't have their own 'th...
Learn Git and GitHub from scratch with c...
freeCodeCamp runs right in the browser -...
This is part two of our two episode seri...
See how Gemini 3 writes code and builds ...
Download your free Python Cheat Sheet he...